package com.sdry.service.impl.permission;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.sdry.entity.permission.UpmsStaffRole;
import com.sdry.mapper.permission.UpmsStaffRoleMapper;
import com.sdry.service.permission.UpmsStaffRoleService;

/**
 * 
 * @ClassName:UpmsStaffRoleServiceImpl
 * @Description:员工+角色实现
 * @Author tdd
 * @Date 2018年7月30日下午3:08:42
 * @version 1.0
 */
@Service
@Transactional(rollbackFor = Exception.class)
public class UpmsStaffRoleServiceImpl implements UpmsStaffRoleService {

	/**注入员工+角色Mapper*/
    @Resource UpmsStaffRoleMapper  upmsStaffRoleMapper;
    /**
     * 根据主键拼接的字符串删除 员工+角色返回影响行数
    */
    public Integer delete(String ids) {
        return upmsStaffRoleMapper.delete(ids);
    }
    /**
     * 条件分页查询员工+角色
    */
    public List<UpmsStaffRole> findPageByMution(UpmsStaffRole upmsStaffRole){
        return upmsStaffRoleMapper.findPageByMution(upmsStaffRole);
    }
    /**
     * 插入返回员工+角色id
    */
    public Long insert(UpmsStaffRole upmsStaffRole){
        return upmsStaffRoleMapper.insert(upmsStaffRole);
    }
    /**
     * 条件查询员工+角色
    */
    public List<UpmsStaffRole> queryAllByMution(UpmsStaffRole upmsStaffRole){
        return upmsStaffRoleMapper.queryAllByMution(upmsStaffRole);
    }
    /**
     * 根据id查询员工+角色
    */
    public UpmsStaffRole queryById(Long id){
        return upmsStaffRoleMapper.queryById(id);
    }
    /**
     * 条件查询员工+角色总条数
    */
    public Integer selectCountByMution(UpmsStaffRole upmsStaffRole){
        return upmsStaffRoleMapper.selectCountByMution(upmsStaffRole);
    }
    /**
     * 根据主键更新 员工+角色返回影响行数
    */
    public Integer update(UpmsStaffRole upmsStaffRole){
        return upmsStaffRoleMapper.update(upmsStaffRole);
    }
	@Override
	public UpmsStaffRole queryByScodePass(String scode, String pass) {
		return upmsStaffRoleMapper.queryByScodePass(scode,pass);
	}

}